<style>
.fui-page {
   background: linear-gradient(#fbce2a, #fcd7f7);
   bottom:0;
}
</style>
<div class="fui-page fui-page-current">
	<div class='fui-content' style="background:none;padding-top:1rem;">
	<div style="padding:0.5rem">
		<div class="top" style="margin-bottom:-1.3rem;z-index:108">
			<div class="c">
				<img style="width:3rem;height:3rem;border-radius:100%" src="{{tomedia(pagedata.account.logo) || '../core/resource/images/web-logo.jpg'}}"  />
			</div>
		</div>
		<div class="fui-code" style="background: linear-gradient(#fdf5d8, #fcd7f7);border-radius: 0.5rem;padding-bottom:1rem">
		<div class="fui-line-title" style="padding-top:1.3rem" ng-click="tool.clip(pagedata.member.id)">
			<div>{{pagedata.account.title}}</div>
		</div>
		<div class="fui-cell-group" style="background:none;margin-top:0">
			<div class="fui-cell">
				<div class="fui-cell-label">{{pagedata.issendcode==1?'手机号':'账号'}}</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的{{pagedata.issendcode==1?'手机号':'账号'}}"  ng-model="pagedata.item.mobile" /></div>
				<div ng-if="pagedata.issendcode==1" class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code(pagedata.item.mobile,'sms_code')" id="sms_code">获取验证码</a></div>
			</div>
			<div ng-if="pagedata.issendcode==1" class="fui-cell">
				<div class="fui-cell-label">验证码</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.item.smscode" /></div>
			</div>
			<div ng-if="pagedata.issendcode!=1" class="fui-cell">
				<div class="fui-cell-label ">密码</div>
				<div class="fui-cell-info"><input type="password" class='fui-input' placeholder="请输入密码" ng-model="pagedata.item.password" /></div>
			</div>
			<div ng-if="pagedata.issendcode!=1" class="fui-cell">
				<div class="fui-cell-label ">确认密码</div>
				<div class="fui-cell-info"><input type="password" class='fui-input' placeholder="请再次输入密码" ng-model="pagedata.item.password2" /></div>
			</div>
		</div>
		<div class="fui-cell-group" style="background:none;">
		<div class="fui-cell">
				<div class="fui-cell-label">邀请码</div>
				<div ng-if="pagedata.item.isfromuser!=1" class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入推荐人邀请码" ng-model="pagedata.item.fromcode"/></div>
				<div ng-if="pagedata.item.isfromuser==1" class="fui-cell-info"><input type="text" class='fui-input' readonly="readonly" ng-model="pagedata.item.fromcode"/></div>
		</div>
		<div class="fui-cell small ">
				<div class="fui-cell-info">
					<label class="checkbox-inline">
						<input type="checkbox" value="1" ng-model="pagedata.item.check" class="fui-checkbox-primary" id="agree" ng-checked="pagedata.item.check==1"/> 我已经阅读并了解了<a id="btn-apply" ng-click="pagedata.show_xieyi=true;" style="color:#337ab7;">【{{pagedata.setmobile.xieyi_title || '客户注册协议'}}】</a>。
					</label>
				</div>
		</div>
		</div>
		<a href="javascript:;" ng-click="pagedata.check(0)" class='btn btn-success block'>注册账户并下载(安卓APP)</a>
		<a href="javascript:;" ng-click="pagedata.check(1)" class='btn btn-success block'>注册账户并下载(苹果APP)</a>
		<div class="form-group other-login-line">
			<div class="login-footer">已经有了{{pagedata.name}}账号？<a class="action" href="javascript:;" ng-click="pagedata.showmember=true;">去直接下载</a></div>
		</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/_footer')"></div>
<div ng-include="sys_html('common/_xieyi',true)"></div>
<div ng-if="pagedata.showmember" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showmember=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem;padding-top:0.5rem;">
				<div class='fui-cell-title c'>登录下载
				</div>
				<div class="fui-cell">
					<div class="fui-cell-label">{{pagedata.issendcode==1?'手机号':'账号'}}</div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的{{pagedata.issendcode==1?'手机号':'账号'}}"  ng-model="pagedata.item.mobile"/></div>
					<div ng-if="pagedata.issendcode==1" class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code(pagedata.item.mobile,'sms_code')" id="sms_code">获取验证码</a></div>
				</div>
				<div ng-if="pagedata.issendcode==1" class="fui-cell">
					<div class="fui-cell-label">验证码</div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.item.smscode" /></div>
				</div>
				<div ng-if="pagedata.issendcode!=1" class="fui-cell">
					<div class="fui-cell-label">密码</div>
					<div class="fui-cell-info"><input type="password" class='fui-input' placeholder="请输入密码" ng-model="pagedata.item.password" /></div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;" ng-click="pagedata.logincheck(0)">确认登录下载(安卓APP)</a>
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;" ng-click="pagedata.logincheck(1)">确认登录下载(苹果APP)</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.showsharecover" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="top:0;width:100%">
		<div id="cover">
			<div class='fui-mask-m visible'></div>
			<div class='arrow'></div>
			<div class='content'>请点击右上角<br/>选择【在浏览器中打开】<br/>进行注册下载！！</div>
		</div>
		</div>
	</div>
</div>
<script>
scope.pagedata.item.needcheck=1;
if(window.config.container=='wechat'){
	scope.pagedata.showsharecover=true;
	scope.$evalAsync();
}
scope.pagedata.check=function(isapple){
	scope.post_json('jy_liangoods/member.appregister/register/',scope.pagedata.item,function(res){
		if(res!='success'){
			scope.message(res);
			return false;
		}
		scope.message('注册成功！');
		if(isapple==1){
			if(!scope.pagedata.installbak2){
				scope.message('暂时不支持苹果APP下载！');
			}
			window.location.href=scope.pagedata.installbak2;
		}else{
			window.location.href=scope.pagedata.installbak;
		}
	});
}
scope.pagedata.logincheck=function(isapple){
	scope.post_json('jy_liangoods/member.appregister/login/',scope.pagedata.item,function(res){
		if(res!='success'){
			scope.message(res);
			return false;
		}
		if(isapple==1){
			if(!scope.pagedata.installbak2){
				scope.message('暂时不支持苹果APP下载！');
			}
			window.location.href=scope.pagedata.installbak2;
		}else{
			window.location.href=scope.pagedata.installbak;
		}
	});
}
</script>